using System;
using UnityEngine;

public class UITimeLimitedOffer : MonoBehaviour
{
	public UILabel labelTime;

	private void Start()
	{
		Transform transform = base.transform;
		Vector3 localScale = base.transform.localScale;
		Vector3 localScale2 = base.transform.localScale;
		transform.localScale = MathHelper.setX(localScale, localScale2.x * MyScreen.factor);
		Transform transform2 = base.transform;
		Vector3 localPosition = base.transform.localPosition;
		Vector3 localPosition2 = base.transform.localPosition;
		transform2.localPosition = MathHelper.setX(localPosition, localPosition2.x * MyScreen.factor);
	}

	private void Update()
	{
		int num = DateTime.Now.DayOfYear * 24 * 3600 + DateTime.Now.Hour * 3600 + DateTime.Now.Minute * 60 + DateTime.Now.Second;
		int num2 = Mathf.Abs(num - GameData.TimeStartGameTimeLimit);
		int num3 = 172800 - num2;
		Global.stringBuilder.Remove(0, Global.stringBuilder.Length);
		if (num3 / 3600 < 10)
		{
			Global.stringBuilder.Append("0");
		}
		Global.stringBuilder.Append(num3 / 3600);
		if (num3 % 3600 / 60 < 10)
		{
			Global.stringBuilder.Append(":0");
		}
		else
		{
			Global.stringBuilder.Append(":");
		}
		Global.stringBuilder.Append(num3 % 3600 / 60);
		if (num3 % 3600 % 60 < 10)
		{
			Global.stringBuilder.Append(":0");
		}
		else
		{
			Global.stringBuilder.Append(":");
		}
		Global.stringBuilder.Append(num3 % 3600 % 60);
		labelTime.text = Global.stringBuilder.ToString();
	}
}
